package cn.seecoder.courselearning.vo.post;

import cn.seecoder.courselearning.po.post.Post;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NonNull;

@Data
public class PostVO {
    private Integer postId;

    private Integer courseId;

    private Integer authorId;

    private String postName;

    private String content;

    private String authorName;

    public PostVO() { }
    public PostVO(@NonNull Post post){
        postId=post.getPostId();
        courseId=post.getCourseId();
        authorId=post.getAuthorId();
        postName=post.getPostName();
        content=post.getContent();
        authorName=post.getAuthorName();
    }

}
